import 'package:flutter_yfree/main/YFree+Model.dart';

class AddressModel {
  late String id;
  late String name;
  late String phone;
  late String area;
  late String address;
  late bool isDefault;

  AddressModel.fromJson(Map<dynamic, dynamic> map) {
    id = map.byString("id", defaultValue: "")!;
    name = map.byString("name", defaultValue: "")!;
    phone = map.byString("phone", defaultValue: "")!;
    area = map.byString("area", defaultValue: "")!;
    address = map.byString("address", defaultValue: "")!;
    isDefault = map.byBool("isDefault", defaultValue: false)!;
  }
}

class BindStatusModel {
  late bool isBindPhone;
  late bool isBindThirdQQ;
  late bool isBindThirdWeChat;

  BindStatusModel.fromJson(Map<dynamic, dynamic> map) {
    isBindPhone = map.byBool("isBindPhone", defaultValue: false)!;
    isBindThirdQQ = map.byBool("isBindThirdQQ", defaultValue: false)!;
    isBindThirdWeChat = map.byBool("isBindThirdWeChat", defaultValue: false)!;
  }
}
